Polar Gauge (DCI Score Gauge)
Visually communicates progress toward a goal or target as a percentage within a circular format. The circle represents 100%.
#Examples
Primarily used for DCI scores, but can be adapted for other Siteimprove metrics with a target of 100. Ideal for tracking key performance indicators (KPIs) and completion rates. Ensure the goal is clear to the user.
The component consists of:
- Product Title: Clearly indicates the metric being tracked (e.g., "DCI Score").
- Score: Displays the current score in a x/100 format (e.g., "25.9/100").
- Progress Indicator: Visually represents the score as a filled portion of the circle.
- Progress Change: Shows the change in score over a specified period (e.g., "+50.0") with a tooltip explaining the change (e.g., "Change to your score over the last 30 days").
- Custom Site Target Button: (Icon-only) Allows the user to view the target score.
- Industry Benchmark Button: (Icon-only) Provides a comparison to industry averages.
#Basic Usage
Product Title
0.0 /100
undefined: 75.0undefined: 90.0
return (
<DCIGauge
title="Product Title"
scoreValue={25}
benchmark={75}
benchmarkSupportLink={
"https://support.siteimprove.com/hc/en-gb/articles/115001853672-What-is-the-industry-benchmark"
}
delta={{ value: 50, tooltipText: "Tooltip text", ariaLabel: "Change last 30 days:" }}
target={90}
currentIndustryName={"Industry Name"}
/>
);
#Animation Changes Usage
If you are unsatisfied with the default delay and duration of the animations, you can set them yourself to make the animation go faster or slower.
Product Title
0.0 /100
undefined: 75.0undefined: 90.0
return (
<DCIGauge
title="Product Title"
scoreValue={25}
benchmark={75}
benchmarkSupportLink={
"https://support.siteimprove.com/hc/en-gb/articles/115001853672-What-is-the-industry-benchmark"
}
delta={{ value: 50, tooltipText: "Tooltip text", ariaLabel: "Change last 30 days:" }}
target={90}
currentIndustryName={"Industry Name"}
animationDelay={0}
animationDuration={600}
/>
);
#Properties
Product Title
0.0 /100
undefined: 75.0undefined: 90.0
Property | Description | Defined | Value |
---|---|---|---|
titleRequired | string | ||
scoreValueRequired | number | ||
benchmarkOptional | number Value for the industry benchmark score | ||
targetOptional | number Value for the user set target score | ||
currentIndustryNameOptional | string | ||
benchmarkSupportLinkOptional | string | ||
aria-labelOptional | string Label for the gauge | ||
deltaOptional | object Values for the circular progress component animation | ||
animationDelayOptional | number Value that overrides the delay between animations | ||
animationDurationOptional | number Value that overrides the duration of animations |
#Guidelines
#Best practices
#Do not use when
#Accessibility
Explore detailed guidelines for this component: Accessibility Specifications